Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPR: enforce deprecation of Categorical.replace #49255

Merged
merged 4 commits into from
Oct 23, 2022

Conversation

lukemanley
Copy link
Member

  • Added an entry in the latest doc/source/whatsnew/v2.0.0.rst file if fixing a bug or adding a new feature.

Deprecation added in #44929

@lukemanley lukemanley added the Deprecate Functionality to remove in pandas label Oct 22, 2022
expected = Categorical(result)
with tm.assert_produces_warning(FutureWarning, match="Series.replace"):
# GH#44929 replace->_replace
result = cat.replace(to_replace, value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth keeping this test and replacing this line with result = Series(cat).replace(to_replace, value)._values?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good point. Added back/updated the test. thx

@phofl phofl added this to the 2.0 milestone Oct 23, 2022
@phofl phofl merged commit a19b981 into pandas-dev:main Oct 23, 2022
@phofl
Copy link
Member

phofl commented Oct 23, 2022

thx @lukemanley (can you update deprecations issue)

@lukemanley lukemanley deleted the categorical-replace branch October 26, 2022 10:17
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants